destructor TDrawScreen.Destroy;
var
  i                         : Integer;
begin
  m_SysMsgList.Free;
  m_SysMsgListEx.Free;
  m_SysMsgListEx2.Free;
//ע͵ͷſɽ͹浼¿ͻں˼ Development 2019-01-04
//  for i := 0 to m_smListCnt.Count - 1 do
//    Dispose(PTCenterMsg(m_smListCnt[i]));
//  m_smListCnt.Free;
//  for i := 0 to m_smListCntFree.Count - 1 do
//    Dispose(PTCenterMsg(m_smListCntFree[i]));
//  m_smListCntFree.Free;

  ChatStrs.Free;
  m_adList.Free;
  m_adList2.Free;
  ChatBks.Free;

  m_Hint1.Free;
  m_Hint2.Free;
  m_Hint3.Free;
  inherited Destroy;
end;

procedure TDrawScreen.AddSysMsgCenter(Msg: string; fc, bc, sec: Integer);
var
  i, n, p                   : Integer;
  s                         : string;
  pm, pmfree                : PTCenterMsg;
begin
  if Msg = '' then Exit;
  //if TagCount(Msg, '%') >= 2 then Exit;

  m_smListCnt.Lock;
  try
    if m_smListCnt.Count >= 5 then begin
      m_smListCnt.Delete(0);
      pm := m_smListCnt[0];
      pm.dwCloseTick := GetTickCount;
      m_smListCntFree.Lock;
      try
        m_smListCntFree.Add(pm);
      finally
        m_smListCntFree.UnLock;
      end;
    end;
  finally
    m_smListCnt.UnLock;
  end;
//ע͵ͷſɽ͹浼¿ͻں˼ Development 2019-01-04
//  m_smListCntFree.Lock;
//  try
//    for i := m_smListCntFree.Count - 1 downto 0 do begin
//      pmfree := m_smListCntFree[i];
//      if (pmfree.dwCloseTick > 0) and (GetTickCount - pmfree.dwCloseTick > 5 * 60 * 1000) then begin
//        m_smListCntFree.Delete(i);
//        Dispose(pmfree);
//        //Break;
//      end;
//    end;
//  finally
//    m_smListCntFree.UnLock;
//  end;

  i := 0;
  p := 0;
  s := Msg;
  n := Length(Msg);
  while True do begin
    p := Pos('%', s);
    if p > 0 then begin
      if p < n then begin
        if (Msg[p + 1] = 't') then
          Msg[p + 1] := 'd'
        else begin
          Msg[p] := ' ';
          Msg[p + 1] := ' ';
        end;
      end else if p = n then begin
        Msg[p] := ' ';
      end;
      s := Copy(Msg, p + 1, n - p);
    end else
      Break;
    Inc(i);
    if i > 10 then Break;
  end;
  if Trim(Msg) <> '' then begin
    New(pm);
    pm.s := Msg;
    pm.fc := fc;
    pm.bc := bc;
    pm.dwSec := _MAX(1, sec);
    pm.dwNow := GetTickCount;
    pm.dwCloseTick := 0;
    m_smListCnt.Lock;
    try
      m_smListCnt.Add(pm);
    finally
      m_smListCnt.UnLock;
    end;
  end;
end;

procedure TDrawScreen.ClearChatBoard;
var
  i                         : Integer;
begin
  m_SysMsgList.Clear;
  m_SysMsgListEx.Clear;
  m_SysMsgListEx2.Clear;
//ע͵ͷſɽ͹浼¿ͻں˼ Development 2019-01-04
//    for i := 0 to m_smListCnt.Count - 1 do
//      DisPose(PTCenterMsg(m_smListCnt[i]));
//   m_smListCnt.Clear;

//    for i := 0 to m_smListCntFree.Count - 1 do
//      DisPose(PTCenterMsg(m_smListCntFree[i]));
//   m_smListCntFree.Clear;


  ChatStrs.Clear;
  ChatBks.Clear;
  ChatBoardTop := 0;
end;